/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package quanlynhatre.View;

/**
 *
 * @author VOTHUY
 */
public class FrameMain extends javax.swing.JFrame {

    /**
     * Creates new form FrameMain
     */
    public FrameMain() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        DeskPnHome = new javax.swing.JDesktopPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        MenuHeThong = new javax.swing.JMenu();
        MItemThongTin = new javax.swing.JMenuItem();
        MItemDangNhap = new javax.swing.JMenuItem();
        MItemDangXuat = new javax.swing.JMenuItem();
        MenuQuanLy = new javax.swing.JMenu();
        MItemNhanVien = new javax.swing.JMenuItem();
        MItemTreEm = new javax.swing.JMenuItem();
        MItemLopHoc = new javax.swing.JMenuItem();
        MenuDanhMuc = new javax.swing.JMenu();
        MItemPhieuThu = new javax.swing.JMenuItem();
        MItemPhieuChi = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Chương Trình Quản Lý Nhà Trẻ");
        setPreferredSize(new java.awt.Dimension(750, 450));

        javax.swing.GroupLayout DeskPnHomeLayout = new javax.swing.GroupLayout(DeskPnHome);
        DeskPnHome.setLayout(DeskPnHomeLayout);
        DeskPnHomeLayout.setHorizontalGroup(
            DeskPnHomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 842, Short.MAX_VALUE)
        );
        DeskPnHomeLayout.setVerticalGroup(
            DeskPnHomeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 546, Short.MAX_VALUE)
        );

        MenuHeThong.setText("Hệ Thống");

        MItemThongTin.setText("Thông Tin");
        MItemThongTin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MItemThongTinActionPerformed(evt);
            }
        });
        MenuHeThong.add(MItemThongTin);

        MItemDangNhap.setText("Đăng Nhập");
        MenuHeThong.add(MItemDangNhap);

        MItemDangXuat.setText("Đăng xuất");
        MItemDangXuat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MItemDangXuatActionPerformed(evt);
            }
        });
        MenuHeThong.add(MItemDangXuat);

        jMenuBar1.add(MenuHeThong);

        MenuQuanLy.setText("Quản Lý");
        MenuQuanLy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuQuanLyActionPerformed(evt);
            }
        });

        MItemNhanVien.setText("Nhân viên");
        MItemNhanVien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MItemNhanVienActionPerformed(evt);
            }
        });
        MenuQuanLy.add(MItemNhanVien);

        MItemTreEm.setText("Trẻ em");
        MenuQuanLy.add(MItemTreEm);

        MItemLopHoc.setText("Lớp học");
        MenuQuanLy.add(MItemLopHoc);

        jMenuBar1.add(MenuQuanLy);

        MenuDanhMuc.setText("Danh Mục");

        MItemPhieuThu.setText("Phiếu Thu");
        MenuDanhMuc.add(MItemPhieuThu);

        MItemPhieuChi.setText("Phiếu Chi");
        MenuDanhMuc.add(MItemPhieuChi);

        jMenuBar1.add(MenuDanhMuc);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(DeskPnHome)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(DeskPnHome)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void MItemThongTinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MItemThongTinActionPerformed
        // TODO add your handling code here:
        JInternalFrameThongTin frmTT = new JInternalFrameThongTin();
        DeskPnHome.add(frmTT);
        frmTT.setVisible(true);
        
    }//GEN-LAST:event_MItemThongTinActionPerformed

    private void MItemDangXuatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MItemDangXuatActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_MItemDangXuatActionPerformed

    private void MenuQuanLyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MenuQuanLyActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_MenuQuanLyActionPerformed

    private void MItemNhanVienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MItemNhanVienActionPerformed
        // TODO add your handling code here:
        frmNhanVien frm = new frmNhanVien();
        DeskPnHome.add(frm);
        frm.setVisible(true);
    }//GEN-LAST:event_MItemNhanVienActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrameMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrameMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrameMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrameMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FrameMain().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane DeskPnHome;
    private javax.swing.JMenuItem MItemDangNhap;
    private javax.swing.JMenuItem MItemDangXuat;
    private javax.swing.JMenuItem MItemLopHoc;
    private javax.swing.JMenuItem MItemNhanVien;
    private javax.swing.JMenuItem MItemPhieuChi;
    private javax.swing.JMenuItem MItemPhieuThu;
    private javax.swing.JMenuItem MItemThongTin;
    private javax.swing.JMenuItem MItemTreEm;
    private javax.swing.JMenu MenuDanhMuc;
    private javax.swing.JMenu MenuHeThong;
    private javax.swing.JMenu MenuQuanLy;
    private javax.swing.JMenuBar jMenuBar1;
    // End of variables declaration//GEN-END:variables
}
